package pprg.quicksort;

public class QuickSortWorker implements Runnable {

	private int[] a;
	boolean parallel;
	private int leftIndex;
	private int rightIndex;

	public QuickSortWorker(int[] a, int leftIndex, int rightIndex,
			boolean parallel) {
		this.a = a;
		this.parallel = parallel;
		this.leftIndex = leftIndex;
		this.rightIndex = rightIndex;
	}

	public void run() {
		QuickSort.parallelQuicksort(a, leftIndex, rightIndex, parallel);
	}

	public int[] getA() {
		return a;
	}
}
